<?php

namespace App\Http\Controllers;

use EasyWeChat\Foundation\Application;

use Illuminate\Http\Request;

use App\Http\Requests;

class UserController extends Controller
{
    //
    public $wechat;

    public function __construct(Application $wechat){

      $this->wechat = $wechat;

    }


    //获取用户列表
    public function users(){

      $users = $this->wechat->user->lists();

      return $users;

    }


    //获取指定用户
    public function user($openId){

      $user = $this->wechat->user->get($openId);

      return $user;

    }


    //修改备注
    public function remark($openId,$remarks){

      $this->wechat->user->remark($openId,'HAHA');

      return 'ok';

    }

}
